<template>
  <div class="navBer">
      <div class="header_logo">
        <img v-if="type==1" @click="gohome" src="../assets/home.png" alt="加载失败" />
        <img v-if="type==2" @click="back" src="../assets/back.png" alt="加载失败" />
      </div>
        <div class="navBer_title">
          {{title}}
        </div>
  </div>
</template>

<script>
export default {
  components:{
  },
  props: {
    type: {
      type: String,
      default: '1',
    },
    title:{
      type: String,
      default: '--',
    }
  },
  data() {
    return{

    }
  },
  methods:{
    gohome(){
      this.$router.push({path:'/'})
    },
    back(){
      this.$router.go(-1)
    }
  },
  mounted() {

  }

}
</script>

<style scoped lang="scss">
  .navBer{
    user-select:none;
    width: 100%;
    display: flex;
    align-items: center;
    img{
      width: 2vw;
    }
    .navBer_title{
      cursor: pointer;
      font-size: 19px;
      margin-left: 1vw;
      font-weight: 700;
    }
  }

</style>
